From b09f19bf24bd4800516e8528716ed6ce82627813 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 16 Aug 2005 18:12:19 +0000 Subject: [PATCH] Add a couple of well chosen assertions to new context switch code. Signed-off-by: Keir Fraser --- xen/arch/x86/domain.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 7df964347b..ad8716aac6 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -815,6 +815,8 @@ void context_switch(struct vcpu *prev, struct vcpu *next) { unsigned int cpu = smp_processor_id(); + ASSERT(!local_irq_is_enabled()); + set_current(next); if ( (percpu_ctxt[cpu].curr_vcpu != next) && !is_idle_task(next->domain) ) @@ -828,6 +830,8 @@ void context_switch_finalise(struct vcpu *next) { unsigned int cpu = smp_processor_id(); + ASSERT(local_irq_is_enabled()); + if ( percpu_ctxt[cpu].context_not_finalised ) { percpu_ctxt[cpu].context_not_finalised = 0; -- 2.30.2